import smtplib

def send(msgfrom, msgto, msgtxt, gmailuser, gmailpassword):
  msg="From: %s\r\nTo: %s\r\n\r\n%s\r\n" % (msgfrom, msgto, msgtxt)
  srv=smtplib.SMTP("smtp.gmail.com",587)
  srv.ehlo()
  srv.starttls()
  srv.ehlo()
  srv.login(gmailuser, gmailpassword)
  srv.sendmail(gmailuser, msgto, msg)
  srv.close()


